/*
 * $Id: SystemContactInfoDAO.java,v 1.2 2009/07/10 15:18:35 navdeep_mahajan Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.common.database.dao;

import com.ge.healthcare.autosc.common.ASCUtil;
import com.ge.healthcare.autosc.common.database.pojo.HstSystemContactInfo;

public class SystemContactInfoDAO extends BaseDAO implements
		ISystemContactInfoDAO {

	/**
	 * Eclipse generated
	 */
	private static final long serialVersionUID = -5530444571586179768L;

	public SystemContactInfoDAO() {
		super(HstSystemContactInfo.TABLE_NAME);
	}

	public HstSystemContactInfo getSystemContactInfoByID(
			Long systemContactInfoId) {
		Object systemContactInfo = findObjectByID(
				HstSystemContactInfo.COL_SYSTEM_CONTACT_INFO_ID,
				systemContactInfoId);
		if (!ASCUtil.isNullOrEmptyObject(systemContactInfo)) {
			return (HstSystemContactInfo) systemContactInfo;
		}
		return null;
	}

	public HstSystemContactInfo getSystemContactInfoByStepTypeId(Long stepTypeId) {
		Object request = findObjectByID(HstSystemContactInfo.COL_STEP_TYPE_ID,
				stepTypeId);
		if (!ASCUtil.isNullOrEmptyObject(request)) {
			return (HstSystemContactInfo) request;
		}
		return null;
	}

	public void saveAlways(Object pojo) {
		super.save(pojo);
	}

}
